[pull] master from cube-js:master#454
Merged
pull[bot] merged 5 commits intocode:masterfrom May 7, 2026
Merged
Conversation
…0832) * docs: Rename billing segments to on-demand and contract customers Align account-billing docs with on-demand vs contract customer terminology, document the terms in naming conventions, and mirror the support/pricing wording in legacy product docs. Co-authored-by: Cursor <cursoragent@cursor.com> * docs: Fold billing customer terms into Product Taxonomy intro Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: add view groups documentation Add documentation for the view_group feature introduced in v1.6.43: - New reference page: reference/data-modeling/view-group.mdx Covers name, title, description, and views parameters with YAML and JavaScript examples using the ecommerce data model. - View reference: add view_group and view_groups parameters Documents both singular and plural forms for assigning views to groups. - Conceptual views page: add 'Grouping views with view groups' section with a full example showing both group-level and view-level assignment. - Syntax page: mention view_groups in folder structure example. - Navigation: add view-group page to Reference > Data Modeling. Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com> * docs: use underscore notation consistently in JS examples Replace viewGroup/viewGroups with view_group/view_groups in JavaScript code examples to follow the Cube DSL convention of snake_case across all syntaxes (YAML and JavaScript). Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com> * fix --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Artyom Keydunov <artyom.keydunov@gmail.com>
The event has passed; remove the promo banner from docs. Co-authored-by: Cursor <cursoragent@cursor.com>
…he (#10822) * feat(cubestore): add stale-while-revalidate timeout for SQL query cache Add CUBESTORE_QUERY_CACHE_STALE_WHILE_REVALIDATE env config param that enables stale-while-revalidate behavior for CubeStore's SQL result cache. When enabled (set to a number of seconds, e.g. 30), the cache maintains a secondary lookup keyed only by SQL query text + inline tables (ignoring partition/chunk IDs). If a query arrives and the exact cache key (which includes current partition/chunk snapshot) misses, but a stale entry exists and was created within the configured timeout, the stale result is served immediately while a background task refreshes the cache with fresh data. This is disabled by default (0 = disabled). The feature reduces query latency during compaction or partition changes when the underlying data hasn't materially changed. Changes: - config/mod.rs: Add query_cache_stale_while_revalidate_secs to ConfigObj trait and ConfigObjImpl, parsed from CUBESTORE_QUERY_CACHE_STALE_WHILE_REVALIDATE - sql/cache.rs: Add stale_cache (Moka cache keyed by SqlQueueCacheKey), stale-while-revalidate lookup in get(), background refresh via tokio::spawn - app_metrics.rs: Add DATA_QUERIES_CACHE_STALE_HIT counter metric - Unit test for stale-while-revalidate behavior Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com> * refactor(cubestore): use queue cache for background stale-while-revalidate refresh The background refresh spawned by stale-while-revalidate now integrates with the queue cache dedup mechanism: - Extract try_register_background() which atomically checks if a query is already in flight in the queue cache and registers a new entry if not. - On stale hit, try_register_background() is called first. If another execution is already in flight (from a previous stale hit or a concurrent foreground request), we skip spawning entirely. - The background spawn registers a watch::Sender in the queue cache, so any concurrent foreground get() for the same SQL that doesn't hit the stale cache will join as a waiter instead of starting a duplicate execution. - Queue cache entry cleanup happens lazily: sender is dropped when the background task completes, closing the channel. The next get() for that key detects the closed channel via has_changed().is_err() and pops it. Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com> * refactor(cubestore): reuse queue cache flow for background stale-while-revalidate Extract get_inner() with is_background_refresh flag from get(). The background spawn now calls get_inner(true) which skips the stale cache check but reuses the entire queue cache dedup flow — no separate implementation for the background path. - get() is a thin wrapper: delegates to get_inner(false) - get_inner(is_background_refresh=true) skips stale check, goes straight to queue cache logic for natural dedup - get() now takes self: &Arc<Self> so the spawn can clone the Arc - get_inner() takes self: Arc<Self> and returns Pin<Box<dyn Future>> to satisfy Send + 'static bounds for tokio::spawn - Removed try_register_background() and all duplicated cache update logic from previous approach Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com> * fix(cubestore): fix stale-while-revalidate test to simulate partition change The test now invalidates the exact result cache before the second get() call to simulate a partition/chunk change that would make the exact cache key miss while the stale entry (keyed by SQL only) still matches. Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com> * fix(cubestore): address review feedback on stale-while-revalidate cache - Add weigher to stale_cache so max_capacity is in bytes, not entry count - Fix clippy: use Duration::from_secs as method reference instead of closure - Add test: background refresh failure preserves stale entry for next request - Add test: stale timeout expiry falls through to fresh execution Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com> * feat(cubestore): add size/weight metrics for stale cache Add cs.sql.query.data.cache.stale.size and cs.sql.query.data.cache.stale.weight gauge metrics mirroring the existing result cache metrics. Reported alongside result cache metrics on cache mutations and zeroed on drop. Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )